package com.googlecode.agscrum.model.repository;

import java.util.List;

import com.googlecode.agscrum.model.util.Criteria;

public interface Repository<Entity, Key> {

	public Entity save(Entity entity);

	public void remove(Entity entity);

	public Entity findBy(Key id);

	public List<Entity> findAll();

	public List<Entity> readByCriteria(Criteria criteria, int initialPos,
			int finalPos);

	public List<Entity> readByCriteria(Criteria criteria);

	public Long totalOfByCriteria(Criteria criteria);
}
